﻿using UnityEngine;
using System.Collections;

public class GetAnimation : MonoBehaviour {
	Animator anim;
	public  bool FlagAnimationHide =false;
	public bool FlagAnimationShow =false;
	// Use this for initialization
	void Start () {
		anim = GetComponent<Animator>();
	}
	public void HideTrue()
	{
		FlagAnimationHide = true;
		}
	public void ShowTrue()
	{
		FlagAnimationShow = true;
	}
	// Update is called once per frame
	void Update () {
	if(FlagAnimationHide==true)
		{
			anim.SetBool("FlagStart",true);
			anim.SetBool("FlagHide",true);
			FlagAnimationHide=false;
		}
		if(FlagAnimationShow==true)
		{
			anim.SetBool("FlagStart",true);
			anim.SetBool("FlagHide",false);
			FlagAnimationShow=false;
		}

	}
}
